#include <iostream>
#include <sstream>

using namespace std;
//ab7c d234bk jalf 34 78k3j4 a 59jfd45
int stoi(string str, int *start = NULL)
{
    bool bFirstTime = true;

    int s = 0;
    size_t i;
    for(i=*start; i<str.size(); i++)
    {
        if (bFirstTime)
        {
            if (str[i]<='9' && str[i]>='0')
            {
                bFirstTime = false;
                s = str[i]-'0';
            }
        }
        else
        {
            if (str[i]<='9' && str[i]>='0')
            {
                s = 10*s+(str[i]-'0');
            }
            else
            {
                *start = i;
                return s;
            }
        }
    }

    if (bFirstTime)
        *start = -1;
    else
        *start = i;
    return s;
}

int main()
{
    string line;
    int ndigit;
    int start = 0;

    getline(cin, line);
    while(start<(int)line.size() && start!=-1)
    {
        ndigit = stoi(line, &start);
        if (start!=-1)
            cout << ndigit << " ";
    }

    return 0;
}
